import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;


public class SaveLevel {
	public static void Save(){
		int num = 0;
		for(int x = 0; x < 15; x++){
			for(int y = 0; y < 15; y++){
				num++;
				System.out.println(Variable.type[x][y]);
				Writer output = null;
				  String text = ""+Variable.type[x][y];
				  File file = new File("Level1/"+num+".txt");
				  try {
					output = new BufferedWriter(new FileWriter(file));
					 output.write(text);
					 output.close();
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				
				  System.out.println("File has been written"); 
			}
		}
	}
}
